Ext.define('FM.controller.tree.NavTreeController', {// 主控制类
	extend : 'FM.controller.MainController',
	views : [ 'tree.NavTree' ],
	init : function() {
		console.log('The tree panel was rendered');
		this.control({
			'navTree' : {
				itemdblclick : this.selectNode
			}
		});
	},
	selectNode : function(tree, record) {
		console.log('The tree panel was clicked');
		var self = this;
		if (record.data.id == 'add-user') {
			this.requireController("FM.controller.form.user.AddUserFormController", self);
		}
		if (record.data.id == 'find-user') {
			this.requireController("FM.controller.grid.user.UserGridController", self);
		}
		if (record.data.id == 'profile-node') {
			this.requireController("FM.controller.comprofile.ComProfileController", self);
		}
	}
});